import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import router from './router'
import store from './store/store'
import 'element-ui/lib/theme-chalk/index.css'
import ELementUI from 'element-ui'
// import { NavBar } from 'vant'
import 'vant/lib/index.css'
import 'github-markdown-css/github-markdown.css'

var echarts = require('echarts');

Vue.prototype.$echarts = echarts

// import Cloudbase from "@cloudbase/vue-provider";
import config from "../cloudbaserc";
import cloudbase from '@cloudbase/js-sdk'


Vue.config.productionTip = false;
// Vue.use(NavBar)
Vue.use(ELementUI,{size:'small'})
// Vue.config.ElMessage
// Vue.use(Cloudbase, {
// env: "process.env.VUE_APP_ENV_ID||config.envId"
// });
// Vue.use(Cloudbase, {
//     env: process.env.VUE_APP_ENV_ID || config.envId,
// });
const tcb = cloudbase.init({env:'biyuwu-7gdk3rsjf4cd88b4'})
tcb
    .auth({ persistence:"local"})
    .anonymousAuthProvider()
    .signIn();
Vue.prototype.$cloudbase=tcb;

// const auth = tcb.auth({persistence:'local'})

// Vue.use(Cloudbase, {
// env: "biyuwu-5guqkljafeb7b933"
// });
console.log(process.env.VUE_APP_ENV_ID)
console.log(config.envId)
// console.log(Cloudbase)

Vue.config.productionTip = false
// axios.defaults.withCredentials=true // 允许携带cookie
// axios.defaults.crossDomain=true
Vue.prototype.$axios=axios

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
